package com.share.hope.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Builder(toBuilder = true)
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "products", autoResultMap = true)
@Schema(description = "存储商品的基本信息")
public class ProductsInfo extends BaseEntity {

    @TableId(type = IdType.AUTO, value = "id")
    @Schema(description = "主键")
    private Long id;

    @TableField(value = "name")
    @Schema(description = "商品名称")
    private String name;

    @TableField(value = "price")
    @Schema(description = "商品价格")
    private Double price;

    @TableField(value = "description")
    @Schema(description = "商品描述")
    private String description;

    @TableField(value = "image_url")
    @Schema(description = "商品图片的URL")
    private String imageUrl;

}
